package com.nopegram.gen.generator.controller;

import com.nopegram.gen.generator.domain.SysUser;
import org.springframework.web.bind.annotation.*;

import java.util.*;

/**
 * @ClassName UserController
 * @Description
 * @Version 1.0
 * @Date 2020/11/2 10:31
 * @Author liulei
 **/

@RequestMapping("user")
@RestController
public class UserController {

    @PostMapping("userInfo")
    public SysUser info(){
        SysUser user = new SysUser();
        user.setUserId(1L);
        user.setUserName("admin");

        Set<String> permsSet = new HashSet<>();
        permsSet.add("test");

        List<Long> roleIds = new ArrayList<>();
        roleIds.add(1L);

        user.setRoleIds(roleIds);
        user.setButtons(permsSet);
        return user;
    }
}
